With the rapid development of information technologies, an operating system plays a more and more important role in people's lives. The operating system is a collection of system software that controls operation of other programs, manages system resources and provides an operation interface for a user. Commonly used operating systems include a computer operating system (such as a windows operating system), a mobile phone operating system (such as an Android operating system) and so on. Attentions should be paid to data security protection while data is conveniently and rapidly managed by the user using the operating system. For a user of an ordinary mobile phone operating system, data security is protected through a locking function of the mobile phone operating system, for example, a pattern lock is set in an Android operating system, and a mobile phone user needs to input a pattern lock password to unlock a mobile phone before performing the next operation on mobile phone data. Meanwhile, when the mobile phone user forgets the password, how the operating system authenticates the identity of the current user to protect the data security in the mobile phone is also a key problem to be solved.
In the prior art, when the user of the Android operating system of the mobile phone unlocks the mobile phone by using the pattern lock password, the system performs authentication on the password input by the user and records the number of times when the user inputs a wrong password. Unlocking is not allowed if the password is wrong, and if the user continue to input the wrong password, processing is carried out based on the following two cases:
1. When the user does not establish a Google account bound with the mobile phone:
The unlocking can be implemented only after the user inputs the correct password on a pattern lock interface; otherwise, the system interface stays on an unlocking interface of the pattern lock.
2. When the user has established the Google account bound with the mobile phone:
After the user inputs the wrong password for five times, a button of “Forget the pattern?” will appear on the interface of the operating system, and the user can click the button to enter an interface for unlocking via the Google account, and then input, on this interface, the Google account and a password that are bound with the mobile phone, to unlock the mobile phone. If the user does not use the account for unlocking at this time, but still continue to input the wrong password on the pattern lock interface, when the number of wrong times reaches 15, the system will prompt that the user will be forced to use the Google account for unlocking if the wrong password is input for five more times, that is, the user has to perform unlocking via the Google account after consecutively inputting the wrong pattern password for 20 times. If the user fails to input a correct Google account and password, the mobile phone stays on an unlocking interface of the Google account and does not return to the unlocking interface of the pattern lock.
In the foregoing technical solution, when forgetting the pattern lock password, the user can only log in to the Google account bound with the mobile phone to unlock the pattern lock of the mobile phone; and the user cannot unlock the pattern lock of the mobile phone if the user does not bind a Google account with the mobile phone; or the mobile phone will stay on the unlocking interface of the Google account when the user forgets the account number or password of the Google account and inputs the wrong password for a certain number of times, and in this case, the user cannot return to the pattern unlocking interface for unlocking even if the user recalls the password, and the password can be cleared only by restoring factory defaults or upgrading the operating system, but all user data in the mobile phone may be lost as a result, which will cause great trouble to the user.